package com.geekchique.runningbuddy.controller;

import android.content.Context;
import android.content.Intent;
import android.view.KeyEvent;
import android.widget.ImageButton;

import com.geekchique.runningbuddy.activity.Home;
import com.geekchique.runningbuddy.activity.TabsAdapter;
import com.geekchique.runningbuddy.view.HomeView;

public class HomeControllerImpl implements IHomeController{

	@SuppressWarnings("unused")
	private HomeView homeView;
	private Home home;

	public HomeControllerImpl(Context home) {
	}

	public void createHomeView(Home home, ImageButton stopClock,  ImageButton diary) {

		this.home = home;
		this.homeView = new HomeView(home, stopClock, diary);

	}

	public boolean onKeyDown(int keyCode, KeyEvent event) {
		switch (keyCode) {
			case KeyEvent.KEYCODE_T:
					Intent intent = new Intent(home, TabsAdapter.class);
					home.startActivity(intent);
					break;
			case KeyEvent.KEYCODE_R:
				Intent intent2 = new Intent(home, TabsAdapter.class);
				home.startActivity(intent2);
				break;
      }

      return true;
	}

}
